#include <iostream>
#include <string>
using namespace std;


//两种数据类型的类模板
template <typename T1, typename T2>
class Cat
{
public:
	T1  t1;
	T2 t2;
	Cat(T1 t1, T2 t2)
	{
		this->t1 = t1;
		this->t2 = t2;
	}
	void print()
	{
		std::cout << "t1 = " << t1 << endl;
		std::cout << "t2 = " << t2 << endl;
	}
};

void test()
{
	Cat<int,double> cat(23,12.5);
	cat.print();

	Cat<string, int> cat2("abdkas",234);
	cat2.print();
}

void main1()
{
	test();
	system("pause");
}